<?php
/**
 * +----------------------------------------------------------------------
 * | Copyright © Sogu Technologies Co. Ltd 2018-2050 All rights reserved.
 * +----------------------------------------------------------------------
 * | File name: BankCode.php
 * +----------------------------------------------------------------------
 * | Author: sam
 * +----------------------------------------------------------------------
 * | Description: 获取银行代码工具类
 * +----------------------------------------------------------------------
 * | Others: 其他内容的说明
 * +----------------------------------------------------------------------
 * | History: 修改历史记录列表，每条修改记录应包含修改日期、修改者及修改内容简述
 * +----------------------------------------------------------------------
 * | 1.Date: 2019/1/3 Author: sam Modification: 创建
 * +----------------------------------------------------------------------
 */

namespace App\Library\Bank;


class BankCode
{
    /**
     * Description:获取银行编码
     * Author: Sam
     * DateTime: 2019/1/3 20:48
     * @param $bank_name
     * @return mixed
     */
    public static function getBankCode($bank_name)
    {
        $data = config('bank_code');
        return isset($data[$bank_name]) ? $data[$bank_name] : '';
    }

    /**
     * Description:获取京东的银行编码
     * Author:lijiafei
     * @param $bank_name string 银行简称
     * @return string
     */
    public static function getJdBankCode($bank_name)
    {
        $data = config('jd_bank_code');
        return isset($data[$bank_name]) ? $data[$bank_name] : '';
    }
}